package com.example.nlp_clusteringproject.model.enums;

/**
 * @author shenhe
 */
public enum ResultCodeEnum {
    /**
     * 成功
     */
    SUCCESS(200, "success"),

    /**
     * 失败
     */
    FAIL(500, "系统繁忙。。。"),

    PARAM_IS_NULL(501, "参数为空"),
    /**
     * 路径不存在
     */
    PATH_NOT_EXIST(400, "路径不存在"),

    FILE_NUMBER_ERROR(401, "文件数量有误"),

    CATEGORY_NUMBER_ERROR(402, "类别数量有误");


    /**
     * 错误码
     */
    private final int code;

    /**
     * 错误信息
     */
    private final String message;

    ResultCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "ResultCodeEnum{" +
                "code=" + code +
                ", message='" + message + '\'' +
                '}';
    }
}
